#define _CRT_SECURE_NO_WARNINGS 1

#include"SList.h"

void SLTPrint(SLTNode* phead) {
	SLTNode* pcur = phead;
	while (pcur) {
		printf("%d->", pcur->data);
		pcur = pcur->next;
	}
	printf("NULL\n");
}

void SLTPushBack(SLTNode** pphead, SLTDataType x) {
	assert(pphead);

	SLTNode* pnewnode = (SLTNode*)malloc(sizeof(pnewnode));
	pnewnode->data = x;

	if (*pphead == NULL) {
		*pphead = pnewnode;
		pnewnode->next = NULL;
	}
}